// <editor-fold defaultstate="collapsed" desc="Đừng quan tâm"> 
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package gui.vatnuoi;

import gui.event.khachhang.KHTimKiemDlg_evt;
import gui.event.vatnuoi.VNTimKiemFull_evt;
import gui.khachhang.*;
import java.util.ArrayList;
import java.util.List;
import javax.swing.ButtonGroup;
import javax.swing.JComponent;
import javax.swing.JRadioButton;

/**
 *
 * @author nv_ca
 */
public class VNTimKiem_Full extends javax.swing.JDialog {

    /**
     * Creates new form KHTimKiem
     */
    private List<JComponent> radios;
    public VNTimKiem_Full(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        this.setLocationRelativeTo(parent);
        
        //add to group
        ButtonGroup group = new ButtonGroup();
//        group.add(rbtnCoLichHen);
//        group.add(rbtnCoVatNuoiDangDieuTri);
//        group.add(rbtnQua3Nam);
        
        //add to list
        radios = new ArrayList<JComponent>();
//        radios.add(rbtnCoLichHen);
//        radios.add(rbtnCoVatNuoiDangDieuTri);
//        radios.add(rbtnQua3Nam);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlDieuKienTimKiem = new javax.swing.JPanel();
        btnTimKiem = new javax.swing.JButton();
        txtMaKhachHang = new javax.swing.JTextField();
        txtTenKhachHang = new javax.swing.JTextField();
        txtMaBenhAn = new javax.swing.JTextField();
        txtMaTiemChung = new javax.swing.JTextField();
        txtMaVatNuoi = new javax.swing.JTextField();
        txtTenVatNuoi = new javax.swing.JTextField();
        txtDoTuoi = new javax.swing.JTextField();
        txtChungLoai = new javax.swing.JTextField();
        ckboxMaKH = new javax.swing.JCheckBox();
        ckboxTenKH = new javax.swing.JCheckBox();
        ckboxMaBenhAn = new javax.swing.JCheckBox();
        ckboxMaTiemChung = new javax.swing.JCheckBox();
        ckboxMaVatNuoi = new javax.swing.JCheckBox();
        ckboxTenVatNuoi = new javax.swing.JCheckBox();
        ckboxDoTuoi = new javax.swing.JCheckBox();
        ckboxChungLoai = new javax.swing.JCheckBox();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblVatNuoi = new javax.swing.JTable();
        btnIn = new javax.swing.JButton();
        btnClose = new javax.swing.JButton();
        btnSua = new javax.swing.JButton();
        btnChiTiet = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Tìm kiếm vật nuôi");

        pnlDieuKienTimKiem.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Điều kiện tìm kiếm", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, java.awt.Color.blue));

        btnTimKiem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/ultility/_Search-Find-16.png"))); // NOI18N
        btnTimKiem.setText("Tìm Kiếm");
        btnTimKiem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTimKiemActionPerformed(evt);
            }
        });

        ckboxMaKH.setText("Mã KH");

        ckboxTenKH.setText("Tên KH");

        ckboxMaBenhAn.setText("Mã bệnh án");

        ckboxMaTiemChung.setText("Mã tiêm chủng");

        ckboxMaVatNuoi.setText("Mã vật nuôi");

        ckboxTenVatNuoi.setText("Tên vật nuôi");

        ckboxDoTuoi.setText("Độ tuổi (tháng)");

        ckboxChungLoai.setText("Chủng loại");

        javax.swing.GroupLayout pnlDieuKienTimKiemLayout = new javax.swing.GroupLayout(pnlDieuKienTimKiem);
        pnlDieuKienTimKiem.setLayout(pnlDieuKienTimKiemLayout);
        pnlDieuKienTimKiemLayout.setHorizontalGroup(
            pnlDieuKienTimKiemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDieuKienTimKiemLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDieuKienTimKiemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlDieuKienTimKiemLayout.createSequentialGroup()
                        .addGap(0, 519, Short.MAX_VALUE)
                        .addComponent(btnTimKiem, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())
                    .addGroup(pnlDieuKienTimKiemLayout.createSequentialGroup()
                        .addGroup(pnlDieuKienTimKiemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(ckboxMaTiemChung)
                            .addComponent(ckboxMaBenhAn)
                            .addComponent(ckboxTenKH)
                            .addComponent(ckboxMaKH))
                        .addGap(10, 10, 10)
                        .addGroup(pnlDieuKienTimKiemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtMaKhachHang, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
                            .addComponent(txtTenKhachHang, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
                            .addComponent(txtMaBenhAn, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
                            .addComponent(txtMaTiemChung))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(pnlDieuKienTimKiemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(ckboxDoTuoi)
                            .addComponent(ckboxChungLoai)
                            .addComponent(ckboxTenVatNuoi)
                            .addComponent(ckboxMaVatNuoi))
                        .addGap(18, 18, 18)
                        .addGroup(pnlDieuKienTimKiemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtTenVatNuoi, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtMaVatNuoi, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtDoTuoi, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtChungLoai, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(40, 40, 40))))
        );
        pnlDieuKienTimKiemLayout.setVerticalGroup(
            pnlDieuKienTimKiemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDieuKienTimKiemLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDieuKienTimKiemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtMaKhachHang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtMaVatNuoi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ckboxMaKH)
                    .addComponent(ckboxMaVatNuoi))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlDieuKienTimKiemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtTenKhachHang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtTenVatNuoi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ckboxTenKH)
                    .addComponent(ckboxTenVatNuoi))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlDieuKienTimKiemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtMaBenhAn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtDoTuoi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ckboxMaBenhAn)
                    .addComponent(ckboxDoTuoi))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlDieuKienTimKiemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtMaTiemChung, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtChungLoai, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ckboxMaTiemChung)
                    .addComponent(ckboxChungLoai))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, 11, Short.MAX_VALUE)
                .addComponent(btnTimKiem))
        );

        tblVatNuoi.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null}
            },
            new String [] {
                "Mã KH", "Tên KH", "Tên vật nuôi", "Mã bệnh án", "Mã tiêm chủng", "Độ tuổi (tháng)", "Chủng loại"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                true, true, true, true, true, true, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tblVatNuoi.setSelectionMode(javax.swing.ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
        jScrollPane1.setViewportView(tblVatNuoi);

        btnIn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/ultility/Printer-16.png"))); // NOI18N
        btnIn.setText("In...");
        btnIn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnInActionPerformed(evt);
            }
        });

        btnClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/ultility/Close-16.png"))); // NOI18N
        btnClose.setText("Đóng");
        btnClose.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCloseActionPerformed(evt);
            }
        });

        btnSua.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/vatnuoi/Footprint-16 edit.png"))); // NOI18N
        btnSua.setText("Sửa...");
        btnSua.setEnabled(false);
        btnSua.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSuaActionPerformed(evt);
            }
        });

        btnChiTiet.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/ultility/View-Details-16.png"))); // NOI18N
        btnChiTiet.setText("Chi tiết");
        btnChiTiet.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnChiTietActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(pnlDieuKienTimKiem, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(btnSua, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnChiTiet, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnIn, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnClose, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );

        layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnChiTiet, btnClose, btnIn, btnSua});

        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlDieuKienTimKiem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnIn)
                    .addComponent(btnClose)
                    .addComponent(btnSua)
                    .addComponent(btnChiTiet))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
//</editor-fold> 
    private void btnTimKiemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTimKiemActionPerformed
        VNTimKiemFull_evt.btnTimKiemActionPerformed();
    }//GEN-LAST:event_btnTimKiemActionPerformed

    private void btnSuaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSuaActionPerformed
        VNTimKiemFull_evt.btnSuaActionPerformed();
    }//GEN-LAST:event_btnSuaActionPerformed

    private void btnChiTietActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnChiTietActionPerformed
        VNTimKiemFull_evt.btnChiTietActionPerformed();
    }//GEN-LAST:event_btnChiTietActionPerformed

    private void btnInActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnInActionPerformed
        VNTimKiemFull_evt.btnInActionPerformed(tblVatNuoi);
    }//GEN-LAST:event_btnInActionPerformed

    private void btnCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCloseActionPerformed
        VNTimKiemFull_evt.btnCloseActionPerformed(this);
    }//GEN-LAST:event_btnCloseActionPerformed
// <editor-fold defaultstate="collapsed" desc="Đừng quan tâm"> 
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(VNTimKiem_Full.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(VNTimKiem_Full.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(VNTimKiem_Full.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(VNTimKiem_Full.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the dialog */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                VNTimKiem_Full dialog = new VNTimKiem_Full(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnChiTiet;
    private javax.swing.JButton btnClose;
    private javax.swing.JButton btnIn;
    private javax.swing.JButton btnSua;
    private javax.swing.JButton btnTimKiem;
    private javax.swing.JCheckBox ckboxChungLoai;
    private javax.swing.JCheckBox ckboxDoTuoi;
    private javax.swing.JCheckBox ckboxMaBenhAn;
    private javax.swing.JCheckBox ckboxMaKH;
    private javax.swing.JCheckBox ckboxMaTiemChung;
    private javax.swing.JCheckBox ckboxMaVatNuoi;
    private javax.swing.JCheckBox ckboxTenKH;
    private javax.swing.JCheckBox ckboxTenVatNuoi;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPanel pnlDieuKienTimKiem;
    private javax.swing.JTable tblVatNuoi;
    private javax.swing.JTextField txtChungLoai;
    private javax.swing.JTextField txtDoTuoi;
    private javax.swing.JTextField txtMaBenhAn;
    private javax.swing.JTextField txtMaKhachHang;
    private javax.swing.JTextField txtMaTiemChung;
    private javax.swing.JTextField txtMaVatNuoi;
    private javax.swing.JTextField txtTenKhachHang;
    private javax.swing.JTextField txtTenVatNuoi;
    // End of variables declaration//GEN-END:variables
}
//</editor-fold>